home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 19.zip / BS1 part 19 / how to learn assembler.adf / CH5 / 5_5A.asm < prev    next >
Assembly Source File  |  1988-02-25  |  642b  |  35 lines

  1. ;** Sound generation using Hardware-Register ** (5.5A)
  2.  
  3. ctlw = $dff096
  4.  
  5. c0thi = $dff0a0
  6. c0tlo = c0thi+2
  7. c0tl  = c0thi+4
  8. c0per = c0thi+6
  9. c0vol = c0thi+8
  10.  
  11.  
  12. ;!!! when AMIGA 2000 . > 500KB !!!
  13. ; org   $40000
  14. ; load  $40000
  15. ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  16.  
  17. run:
  18.  move.l #table,c0thi          ;Table beginning
  19.  move #8,c0tl                 ;Table lenght
  20.  move #400,c0per              ;read in rate
  21.  move #40,c0vol               ;Loudness level
  22.  move #$8201,ctlw
  23.  jmp run                      ;rts
  24.  
  25. still:
  26.  move #1,ctlw
  27.  jmp ende                     ;rts
  28. table:
  29.  dc.b -40,-70,-90,-100,-90,-70,-40,0
  30.  dc.b 40,70,90,100,90,70,40,0
  31. ende:
  32.  end
  33.  
  34.  
  35.